#ifndef __studies_architecture_bussiness__password__h__
#define __studies_architecture_bussiness__password__h__



/** @file */


/** @todo */

// ==> C++ Headers
#include <string>
// ==> 3rds Headers

// ==> Our Headers
#include <studies.architecture.returns/codes.h>
// ==> Namespaces
using namespace std;

// ==> Macro Constants

// ==> Macro Commands


/** ==> namespace of the organization */
namespace studies {
    /** ==> namespace for the project */
    namespace architecture {
        /** ==> displaying, interacting, transmitting, message, processing,
            object, storing */  
        namespace bussiness {

            // ==> Typedefs 

            // ==> Pre-Declarations

            // ==> Attributes 

            // ==> Functions

            // ==> Classes

            /** 
                @nosubgrouping 
            */
            class password {

                // ==> password - Friends

                /** Class allowed to access private members of @p password, in
                    order to perform tests */
                friend class password_tester;

            public:

                // ==> password - Public Internal Types

                // ==> password - Public Constructors

                /** */
                password()
                    : m_value(){}
                

                /** */
                password(const std::string & p_value) {
                    if (p_value.size() < 8) {
                        throw returns::codes::PWD_MALFORMED;
                    }
                    m_value = p_value;
                }
                

                /** Destructor */
                ~password( ) {}
                

                // ==> password - Public Accessors

                // ==> password - Public Helpers

                // ==> password - Public Processors

                // ==> password - Public Operators

                /** */
                password & operator=(const password & p_pwd) {
                    if (this != & p_pwd) {
                        m_value = p_pwd.m_value;
                    }
                    
                    return *this;
                }

                bool operator==(const password & p_pwd) const {
                    return m_value == p_pwd.m_value;
                }

                bool operator!=(const password & p_pwd) const {
                    return m_value != p_pwd.m_value;
                }
                

                // ==> password - Public Attributes

            private:

                // ==> password - Private Internal Types

                // ==> password - Private Constructors

                // ==> password - Private Accessors

                // ==> password - Private Helpers

                // ==> password - Private Processors

                // ==> password - Private Operators

                // ==> password - Private Attributes

                /** */
                std::string m_value;                
            };
        }
    }
}
// =============================================================================
// I M P L E M E N T A T I O N
// =============================================================================

using namespace studies::architecture::bussiness;


#endif
